package com.xuecheng.api.content;

import com.xuecheng.api.content.model.dto.CourseBaseDTO;
import com.xuecheng.api.content.model.qo.QueryCourseModel;
import com.xuecheng.api.content.model.vo.CourseBaseVo;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * Created on 2021/03/28/10:11 周日
 *
 * @author Lantin
 */
@Api(tags = "内容-课程基本业务信息Api接口")
public interface CourseBaseApi {


    @ApiOperation("根据课程id查询课程基本信息数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "课程id", required = true, dataType = "Long", paramType = "path")
    })
    CourseBaseDTO getCourseBaseById(Long id);


    @ApiOperation("分页条件查询课程基本信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "model", value = "课程基本信息查询条件", required = true, dataType = "课程基础信息查询QO对象", paramType = "body")
    })
    PageVO queryCourseList(PageRequestParams pageRequestParams,
                           QueryCourseModel model);


    @ApiOperation("添加课程基本信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "courseBaseVo", value = "课程基本信息视图对象", required = true, dataType = "CourseBaseVO", paramType = "body")
    })
    CourseBaseDTO createCourseBase(CourseBaseVo courseBaseVo);

    @ApiOperation("修改课程基本信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "courseBaseVo", value = "课程基本信息视图对象", required = true, dataType = "CourseBaseVO", paramType = "body")
    })
    CourseBaseDTO modifyCourseBase(CourseBaseVo courseBaseVo);

    @ApiOperation("删除课程")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "课程id", required = true, dataType = "Long", paramType = "path")
    })
    boolean deleteCourseBase(Long id);

    @ApiOperation(value = "提交审核")
    @ApiImplicitParam(name = "courseBaseId", value = "课程ID", required = true, dataType =
            "Long", paramType = "query", example = "1")
    void commitCourseBase(Long courseBaseId);

    @ApiOperation("课程预览")
    Object previewCourse(Long courseId, Long companyId);

    @ApiOperation("发布课程")
    void publish(Long courseBaseId);
}
